<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class EnterpriceEnergysaverBase extends Model {

	//
	protected $table = 'enterprice_energysaver_base';
	protected $fillable= ['company_name', 'uid', 'legal_person', 'regist_time', 'regist_capital', 'regist_province', 'regist_city', 'regist_area', 'regist_address', 'zcode', 'regist_code', 'fax', 'group_code', 'contact_person', 'contact_number', 'email', 'induction', 'group_code_img', 'regist_copy', 'enterprice_char', 'enterprice_pic', 'logo', 'description'];

	public function registProvince()
	{
		return $this->hasOne("App\Models\Area", "area_id", "regist_province");
	}

	public function registCity()
	{
		return $this->hasOne("App\Models\Area", "area_id", "regist_city");
	}

	public function registArea()
	{
		return $this->hasOne("App\Models\Area", "area_id", "regist_area");
	}

}
